Add freshness check for GPT-5.4 upgrade guidance#360
Conversation
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30ff9e4d60
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const path = require("node:path"); | ||
|
|
||
| const DEFAULT_URL = | ||
| "https://developers.openai.com/api/docs/guides/latest-model.md"; |
There was a problem hiding this comment.
Point resolver at a fetchable latest-model endpoint
DEFAULT_URL targets https://developers.openai.com/api/docs/guides/latest-model.md, but that URL currently returns an HTTP error instead of markdown. As a result, readSource() fails before parsing and the new freshness check cannot succeed under default settings, so the guidance always falls back to bundled docs.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c7837b8ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const DEFAULT_URL = | ||
| "https://developers.openai.com/api/docs/guides/latest-model.md"; |
There was a problem hiding this comment.
Point resolver at a fetchable latest-model endpoint
The resolver defaults to https://developers.openai.com/api/docs/guides/latest-model.md, but the docs guide is served at /api/docs/guides/latest-model (without .md). With the current default, readSource() can fail before parsing, so the freshness check degrades to fallback guidance even when remote metadata exists.
Useful? React with 👍 / 👎.
| const info = {}; | ||
|
|
||
| for (const line of block.split(/\r?\n/)) { | ||
| const match = line.match(/^([A-Za-z][A-Za-z0-9_-]*):\s*(.+?)\s*$/); |
There was a problem hiding this comment.
Allow leading whitespace in comment metadata parser
extractLatestModelInfo() supports HTML comment metadata, but parseFlatInfo() only matches keys at column 0. Indented comment lines (common in YAML-like blocks) are ignored, causing missing model/migrationGuide/promptingGuide and a hard failure. This makes the comment fallback brittle.
Useful? React with 👍 / 👎.
## Summary Sync the bundled `openai-docs` system skill with the already-merged `openai/skills` update from openai/skills#360. Codex bundles system skills from `codex-rs/skills/src/assets/samples`, so this PR copies the same GPT-5.4 OpenAI Docs skill update into the Codex app/CLI bundle path. ## Changes - Add the latest-model resolver script to the bundled `openai-docs` skill. - Route model upgrade and prompt-upgrade requests through remote latest-model metadata when current guidance is needed. - Rename bundled fallback references to `upgrade-guide.md` and `prompting-guide.md`. - Keep the bundled fallback guidance GPT-5.4-only. ## Validation - Verified this bundled skill is byte-for-byte identical to `openai/skills@origin/main` `skills/.system/openai-docs`. - Ran the resolver locally and confirmed it returns `gpt-5.4` / `gpt-5p4`.
Summary
Test plan